<template>
  <div class="teleport-body">
    <template v-for="teleport in 5" :key="teleport.text">
      <div class="teleport-body_item">
        <div class="teleport-body_item_text">银行类别</div>
        <div class="teleport-body_item_count">99</div>
      </div>
    </template>

    <div
      :class="['teleport-body_arrow', arrowStatus ? 'arrow-down' : '']"
      :style="{ top: tops + 'vw' }"
    >
      <div class="teleport-body_arrow_arrows"></div>
    </div>
  </div>
</template>

<script setup lang="ts">
import { computed } from 'vue'

const props = defineProps<{
  teleportData: any[]

  arrowStatus: boolean
}>()
const tops = computed(() => {
  let top = 0
  if (!props.arrowStatus) {
    top = -3.1
  }

  return top
})
</script>
<style lang="scss">
@import '../styles/index';

.teleport-body {
  position: fixed;
  top: 0;
  left: 17.5px;
  z-index: 99;
  box-sizing: border-box;
  display: flex;
  width: calc(100vw - 35px);
  background: #fff;
  border: 1px solid #cf1717;
  border-radius: 5px;
  box-shadow:
    2px 4px 2px 0 #ffc9d4,
    inset 0 -1px 0 0 #fff;

  &_item {
    flex: 1;
    flex-shrink: 0;

    &:nth-child(1) {
      .teleport-body_item_text {
        border-top-left-radius: 5px;
      }
    }

    &:nth-last-child(2) {
      .teleport-body_item_text {
        border-top-right-radius: 5px;
      }
    }

    &_text {
      height: 40px;
      font-size: 10px;
      font-weight: 500;
      color: #740015;
      text-align: center;
      background: #ffc4c4;
      @include flex(row, center, center);
    }

    &_count {
      padding: 8px 0;
      font-size: 14px;
      font-weight: 400;
      color: #333;
      text-align: center;
    }
  }

  &_yb {
    width: 100%;
    @include flex(row, center, space-between);

    .yb-left,
    .yb-right {
      flex: 1;

      &_title {
        padding: 10px 0 8px;
        font-size: 14px;
        font-weight: 500;
        color: #740015;
        text-align: center;
        background: #ffc4c4;
      }

      &_data {
        @include flex(row, center, space-between);

        &_item {
          flex: 1;

          &_text {
            background: #ffd9d9;
            border-radius: 0 !important;
          }
        }
      }
    }

    .yb-left {
      border-right: 1px solid #cf1717;

      &_data {
        .teleport-body_item_count {
          background: #fff;
        }
      }
    }
  }

  &_arrow {
    position: absolute;
    right: 34px;
    z-index: 3;
    width: 0;
    height: 0;
    border: 6px solid transparent;
    border-bottom: 6px solid #cf1717;

    &_arrows {
      position: absolute;
      top: -1.3vw;
      right: -6px;
      z-index: 2;
      width: 0;
      height: 0;
      border: 6px solid transparent;
      border-bottom: 6px solid #ffc4c4;
    }
  }

  .arrow-down {
    transform: rotate(180deg);
  }
}
</style>
